package priv.conceit.sc.hoxton.auth.authority.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import priv.conceit.sc.hoxton.auth.authority.dao.ResourceMapper;
import priv.conceit.sc.hoxton.auth.authority.service.ResourceService;
import priv.conceit.sc.hoxton.common.entity.auth.authority.pojo.Resource;

import java.util.List;

/**
 * <p>
 * 资源 服务实现类
 * </p>
 *
 * @author conceit
 * @since 2020-11-20
 */
@Service
public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> implements ResourceService {

	@Autowired
	ResourceMapper resourceMapper;

	/**
	 * load 根据角色id集合 查询对应的资源
	 *
	 * @param roleIds
	 * @return java.util.List<priv.conceit.sc.hoxton.common.entity.auth.authority.pojo.Resource>
	 * @author conceit
	 * @date 2020/11/24 14:51
	 */
	@Override
	public List<Resource> load(List<Long> roleIds) {
		return resourceMapper.load(roleIds);
	}
}
